<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$lang.cp_home}{if $ur_here} - {$ur_here}{/if}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />
{literal}
<style type="text/css">
  body {
    color: white;
  }
</style>
{/literal}
{insert_scripts files="../js/utils.js,validator.js"}
<script language="JavaScript">
<!--
// 这里把JS用到的所有语言都赋值到这里
{foreach from=$lang.js_languages key=key item=item}
var {$key} = "{$item}";
{/foreach}
//-->
</script>

</head>
<body style="background: #3f6996">
{if $form_act eq "forget_pwd"}
<!--忘记密码-->
<div class="ec_loginBox">
    <img src="images/login_img.png" class="ec_img" />
	<div class="ec_logincon">
    	<h3 style="color:#000;">{$lang.get_newpassword}</h3>	
    	<form action="get_password.php" method="post" name="submitAdmin" onsubmit="return validate()">
    	<div class="ec_checkBox">
        	<label>{$lang.user_name}</label>
            <input type="text" class="ip1" name="username" />
        </div>
        <div class="ec_checkBox">
        	<label>{$lang.email}</label>
            <input type="text" class="ip1"  name="email" />
        </div>
        <div class="ec_checkBox">
        	 <input type="hidden" name="action" value="get_pwd" />
             <input type="hidden" name="act" value="forget_pwd" />
             <input type="submit" class="ip4" value="{$lang.click_button}" style="width:40%" />
             <input type="reset" value="{$lang.reset_button}" class="ip4"   style="width:40%;float:right;"/>
        </div>
        
        </form>
    </div>
</div>
{/if}
{if $form_act eq "reset_pwd"}
<!--重置密码-->
<div class="ec_loginBox">
    <img src="images/login_img.png" class="ec_img" />
	<div class="ec_logincon">
    	<h3 style="color:#000;">{$lang.get_newpassword}</h3>	
    	<form action="get_password.php" method="post" name="submitPwd" onsubmit="return validate2()">
    	<div class="ec_checkBox">
        	<label>{$lang.enter_admin_pwd}</label>
            <input type="password" class="ip1"  name="password" />
        </div>
        <div class="ec_checkBox">
        	<label>{$lang.confirm_admin_pwd}</label>
            <input type="password" name="confirm_pwd" class="ip1" />
        </div>
        <div class="ec_checkBox">
        	<label>{$lang.email}</label>
            <input type="text" class="ip1"  name="email" />
        </div>
        <div class="ec_checkBox">
        	 <input type="hidden" name="action" value="reset_pwd" />
             <input type="hidden" name="act" value="forget_pwd" />
             <input type="hidden" name="adminid" value="{$adminid}" />
             <input type="hidden" name="code" value="{$code}" />
             <input type="submit" class="ip4" value="{$lang.click_button}" style="width:40%" />
             <input type="reset" value="{$lang.reset_button}" class="ip4"   style="width:40%;float:right;"/>
        </div>
        
        </form>
    </div>
</div>
{/if}



{literal}
<script type="text/javascript">
<!--
/**
* 检查表单输入的数据
*/
function validate()
{
  validator = new Validator("submitAdmin");
  validator.required("user_name", user_name_empty);
  validator.required("email", email_empty, 1);
  validator.isEmail("email", email_error);

  return validator.passed();
}

function validate2()
{
  validator = new Validator("submitPwd");
  validator.required("password",            admin_pwd_empty);
  validator.required("confirm_pwd",         confirm_pwd_empty);
  if (document.forms['submitPwd'].elements['confirm_pwd'].value.length > 0)
  {
    validator.eqaul("password","confirm_pwd", both_pwd_error);
  }

  return validator.passed();
}
//-->
</script>
{/literal}
</body>
</html>